package Swing;
import javax.swing.*;
import java.awt.*;
public class borderLayoutExam {
	static final int WIDTH=300;
	static final int HEIGHT=200;
	public static void main(String[] args) {
		JFrame jf = new JFrame("borderLayout example");
		jf.setSize(WIDTH, HEIGHT);
		jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		jf.setVisible(true);
		
		JPanel contentPane = new JPanel();
		jf.setContentPane(contentPane);
		
		JButton jb1 = new JButton("Life");
		JButton jb2 = new JButton("Work");
		JButton jb3 = new JButton("Sleep");
		JButton jb4 = new JButton("Shopping");
		JButton jb5 = new JButton("Food");
		
		JButton jb6 = new JButton("Life");
		JButton jb7 = new JButton("Work");
		
		BorderLayout lay = new BorderLayout();
		jf.setLayout(lay);
		
		JPanel p1 = new JPanel();
		JPanel p2 = new JPanel();
		p1.setLayout(new BorderLayout());
		p2.setLayout(new BorderLayout());
		
		contentPane.add(p1,"West");
		contentPane.add(p2,"East");
		
		p1.add(jb1,"South");
		p1.add(jb2,"West");
		p1.add(jb3,"Center");
		p1.add(jb4,"East");
		p1.add(jb5,"North");
		
		p2.add(jb6,"South");
		p2.add(jb7,"North");
	}
}